package com.wizz.trade.trading.service.impl;

import com.wizz.trade.trading.entity.Balance;
import com.wizz.trade.trading.mapper.BalanceMapper;
import com.wizz.trade.trading.service.BalanceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 余款表 服务实现类
 * </p>
 *
 * @author fyftless
 * @since 2023-04-23 04:37:04
 */
@Service
public class BalanceServiceImpl extends ServiceImpl<BalanceMapper, Balance> implements BalanceService {

    @Resource
    private BalanceMapper balanceMapper;

    @Override
    public void addBalance(Balance balance) {
        balanceMapper.insert(balance);
    }

    @Override
    public void updateBalance(Balance balance) {
        balanceMapper.updateById(balance);
    }

    @Override
    public void deleteBalance(Integer id) {
        balanceMapper.deleteById(id);
    }

//    @Override
//    public PageVo<Balance> getPage(BalancePageDto balancePageDto) {
//        return null;
//    }

    @Override
    public List<Balance> getAll() {
        return balanceMapper.selectList(null);
    }
}
